This page last changed on Apr 28, 2008 by rosspatterson.

Because of dependencies on Team Foundation assemblies which cannot be shipped with the Cruise Control source, this plugin is available as a standalone plugin from the TFS CCNET Plugin project on CodePlex. The plug-in works with Team Foundation Server 2005 and against Team Foundation Server 2008 so long as the Team Explorer client assemblies are available.  To download the latest version of the Microsoft Visual Studio Team Explorer client which will install the client assemblies on your machine then visit the Microsoft Download Site.  Note that the TFS2008 client assemblies work just fine against a TFS2005 server.

Visual Studio Team Foundation Server (VSTS) Configuration Examples

Minimal example:

<sourcecontrol type="vsts">
  <server>my_team_foundation_server</server>
  <project>$/Foobar</project>
  <workingDirectory>c:\projects\Foobar</workingDirectory>
</sourcecontrol>


Full example:
<sourcecontrol type="vsts" autoGetSource="true" applyLabel="true">
  <server>http://my_team_foundation_server:8080</server>
  <username>my_user</username>
  <password>my_password</password>
  <domain>my_domain</domain>
  <project>$/Foobar</project>
  <workingDirectory>c:\projects\Foobar</workingDirectory>
  <cleanCopy>false</cleanCopy>
  <workspace>my_workspace_name</workspace>
  <deleteWorkspace>false</workspace>
</sourcecontrol>



Configuration Elements:

Node Description Type Required Default
server The name or URL of the team foundation server. For example
http://tfsserver:8080



or
tfsserver


if it has already been registered on the machine.
string true null
username Username that CCNet should use to authenticate with Team Foundation Server string false * See Below
password Password for the Team Foundation user string false * See Below
domain Domain for the Team Foundation user string false * See Below
autoGetSource Specifies if CCNet should automatically retrieve the latest version of the source from the repository bool false false
applyLabel Specifies if CCNet should apply the build label to the repository bool false false
workingDirectory The root folder where the latest source will retrieved the Team Foundation Server. This path can either be absolute or it can be relative to the CCNet project working directory. string false CCNet project working directory
cleanCopy Determines is the working directory and all its contents should be deleted before the latest version of the source is downloaded bool false false
workspace The name of the Workspace under which the source should be retrieved. This workspace is created at the start of a download, and deleted at the end. You can normally omit the property unless you want to name a workspace to avoid conflicts on the server (i.e. when you have multiple projects on one server talking to a Team Foundation Server) string false "CCNET"
deleteWorkspace Determines if the workspace should be deleted after source is downloaded using the autoGetSource flag. It is much more efficient to leave the workspace because that way the TFS server can remember the state of the files on the CruiseControl.NET server and only send files that have changed or inform the server of deleted / renamed files. bool false false

*: If no credential is supplied in the config, then the credential of the user that the CruiseControl service runs as will be used automatically. This user must have permission to read and label the Team Foundation Server Source Control repository.

Unlike most source control blocks, this one does not support the timeout configuration element.

Installing the Plugin

To install the plugin you will need a copy of the ccnet.vsts.plugin.dll assembly.  The latest release can be downloaded from the TFS CCNET Plugin project.  The assembly should then be copied into the CruiseControl.NET server directory and the configuration file edited appropriately.

Talking to CodePlex

Microsoft have recently launched CodePlex, a developer community site that uses Team Foundation Server for version control and work item tracking. The following example demonstrates how to configure the source control block to talk to CodePlex. Please note that your username should be suffixed with "_cp".

<sourcecontrol type="vsts" autoGetSource="true" applyLabel="false">
  <server>https://tfs04.codeplex.com</server>
  <username>USERNAME_cp</username>
  <password>PASSWORD</password>
  <domain>SND.RNO.GBL</domain>
  <project>$/Foobar</project>
  <workingDirectory>c:\source\Foobar</workingDirectory>
</sourcecontrol>

Document generated by Confluence on Mar 14, 2009 02:55